<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
  </head>

  <body>
    <canvas id="myCanvas" width="600" height="300">
      <p>您的浏览器不支持 canvas!</p>
    </canvas>

    <script src="/node_modules/jquery/dist/jquery.min.js"></script>
    <script src=".././node_modules/jcanvas/dist/jcanvas.js"></script>
    <script>
      $('canvas')
        .rotateCanvas({
          rotate: 45,
          x: 100,
          y: 100,
        })
        .drawRect({
          fillStyle: '#000',
          x: 100,
          y: 100,
          width: 100,
          height: 50,
        })
        .restoreCanvas()

      /*
      如上代码： rotateCanvas
       */
    </script>
  </body>
</html>
